﻿using System;

namespace Annotations
{
    /// <summary>
    /// Completes the association by providing the information about the inverse role when that role is not navigable (it is not a declared property in the class).
    /// When the property is declared use the InverseAttribute instead
    /// </summary>
    [AttributeUsage(AttributeTargets.Property , AllowMultiple = false)]
    public class InverseRoleAttribute : Attribute
    {
        /// <summary>
        /// The name of the inverse role
        /// </summary>
        public string RoleName { get; set; }

        /// <summary>
        /// Minimum multiplicity of the inverse role
        /// </summary>
        public short MinimumMultiplicity { get; set; }

        /// <summary>
        /// Maximum multiplicity of the inverse role
        /// </summary>
        public short MaximumMultiplicity { get; set; }

        /// <summary>
        /// The entity that is used to associate the roles
        /// </summary>
        public Type Associative { get; set; }
    }
}
